import models
from flask_mongoengine.wtf import model_form
from wtforms.fields import *
from flask_mongoengine.wtf.orm import  validators


user_from = model_form(models.User,exclude=['password'])


class SignupForm(user_from):
    password =PasswordField('Password',
                            validators=[validators.required(),
                            validators.EqualTo('confirm',message='Password must be match ')])
    confirm = PasswordField('Repeat Password')
class LoginForm(user_from):
    password = PasswordField('Password',validators=[validators.required()])


